﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmPedido.aspx.cs" Inherits="Carozos.Web.frmPedido" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" Text="REGISTRO DE PEDIDOS"></asp:Label>
    <br />
    <br />
    <table>
            <tr>
            <th>
                
                <asp:Label ID="Label3" runat="server" Text="Proveedor :"></asp:Label>
                
            </th>
            <th>

                <asp:TextBox ID="txtProveedor" runat="server" Width="110px"></asp:TextBox>

                <asp:RequiredFieldValidator ID="rfvProveedor" runat="server" ControlToValidate="txtProveedor" ErrorMessage="Se necesita un Proveedor" ForeColor="Red">*</asp:RequiredFieldValidator>

            </th>
            <th>
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Img/search.png" OnClick="btnGuarda_Click" PostBackUrl="~/frmBuscaProveedor.aspx" CausesValidation="False" />
             <asp:ImageButton ID="btnGuarda" runat="server" ImageUrl="~/Img/filesave.png" OnClick="btnGuarda_Click" CausesValidation="False" />
            </th>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label2" runat="server" Text="# Pedido :"></asp:Label>
            </th>
            <th>

                <asp:TextBox ID="txtCodPedido" runat="server" Width="87px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPedido" runat="server" ControlToValidate="txtCodPedido" ErrorMessage="Pedido sin Código" ForeColor="Red">*</asp:RequiredFieldValidator>
                <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Img/search.png" OnClick="ImageButton2_Click" CausesValidation="False" />

            </th>
            <th>

            </th>
        </tr>
    
        <tr>
            <th colspan="3">
                <asp:Label ID="Label4" runat="server" Text="Detalles :"></asp:Label>
&nbsp;
                <asp:ImageButton ID="btnAdd" runat="server" ImageUrl="~/Img/bookmark_add.png" PostBackUrl="~/frmBuscaInsumo.aspx"/>
&nbsp;&nbsp;
                <asp:ImageButton ID="btnDel" runat="server" ImageUrl="~/Img/stop.png" OnClick="btnDel_Click" />
                &nbsp;
                <asp:ImageButton ID="btnUpdate" runat="server" ImageUrl="~/Img/quick_restart.png" OnClick="btnUpdate_Click"/>
                <asp:ValidationSummary ID="vs" runat="server" ForeColor="Red" />
            </th>
        </tr>
        <tr>
            <th colspan="3">

                <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="codigo">
                    <Columns>
                        <asp:CommandField ButtonType="Image" SelectImageUrl="~/Img/camera_test.png" SelectText="Seleccionar" ShowSelectButton="True" />
                        <asp:BoundField DataField="pedido" HeaderText="Código" SortExpression="pedido" />
                        <asp:BoundField DataField="insumo" HeaderText="Insumo" SortExpression="insumo" />
                        <asp:TemplateField HeaderText="Cantidad">
                            <ItemTemplate>
                                <asp:TextBox ID="txtCantidad" runat="server" Height="16px" Width="42px">0</asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvCantidad" runat="server" ControlToValidate="txtCantidad" ErrorMessage="Falta Cantidad" ForeColor="Red">*</asp:RequiredFieldValidator>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Precio Uni.">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPrecio" runat="server" Height="16px" Width="42px">0.0</asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvPrecio" runat="server" ControlToValidate="txtPrecio" ErrorMessage="Falta Precio" ForeColor="Red">*</asp:RequiredFieldValidator>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />
                </asp:GridView>

            </th>
        </tr>
        <tr>
            <th colspan="2">

            </th>
            <th>


                <asp:Label ID="lblTotal" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Red" Text="0.00" Visible="False"></asp:Label>


            </th>
        </tr>
    </table>
</asp:Content>
